package com.ruoyi.fitsculpt.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;

/**
 * 用户每日饮食记录对象 easyfit_diet_logs
 *
 * @author metaee
 * @date 2025-02-27
 */
@ApiModel("用户每日饮食记录对象")
public class EasyfitDietLogs extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    @ApiModelProperty("记录ID")
    @Excel(name = "记录ID")
    private Long logId;

    /**
     * 用户ID
     */
    @ApiModelProperty("用户ID")
    @Excel(name = "用户ID")
    private Long userId;

    /**
     * 食物ID
     */
    @ApiModelProperty("食物ID")
    @Excel(name = "食物ID")
    private Long foodId;

    /**
     * 1:早餐 2:午餐 3:晚餐 4:加餐
     */
    @ApiModelProperty("1:早餐 2:午餐 3:晚餐 4:加餐")
    @Excel(name = "1:早餐 2:午餐 3:晚餐 4:加餐")
    private Long mealType;

    /**
     * 份量(克)
     */
    @ApiModelProperty("份量(克)")
    @Excel(name = "份量(克)")
    private BigDecimal portion;

    /**
     * 记录日期
     */
    @ApiModelProperty("记录日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date logDate;

    /** 关联的用户信息 */
    @TableField(exist = false)
    private EasyfitUsers user;

    public Long getLogId() {
        return logId;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getFoodId() {
        return foodId;
    }

    public void setFoodId(Long foodId) {
        this.foodId = foodId;
    }

    public Long getMealType() {
        return mealType;
    }

    public void setMealType(Long mealType) {
        this.mealType = mealType;
    }

    public BigDecimal getPortion() {
        return portion;
    }

    public void setPortion(BigDecimal portion) {
        this.portion = portion;
    }

    public Date getLogDate() {
        return logDate;
    }

    public void setLogDate(Date logDate) {
        this.logDate = logDate;
    }

    public EasyfitUsers getUser() {
        return user;
    }

    public void setUser(EasyfitUsers user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("logId", getLogId())
                .append("userId", getUserId())
                .append("foodId", getFoodId())
                .append("mealType", getMealType())
                .append("portion", getPortion())
                .append("logDate", getLogDate())
                .append("createTime", getCreateTime())
                .toString();
    }
}
